<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
<form action="${contextPath }/admin/newsimage/update.do" method="post" enctype="multipart/form-data">
<table width="100%">
	<tbody>
		<c:if test="${obj==null}">
			<tr>
				<td>标题</td><td><input name="o.title"/>如不填，默认使用关联文章的标题</td>
			</tr>
			<tr>
				<td>图片</td><td><input type="file" name="image"/></td>
			</tr>
			<tr>
				<td>关联文章编号</td><td><input name="o.articleid"/>点击该图片时进入的文章，需要填入该文章的编号</td>
			</tr>
		</c:if>
		<c:if test="${obj!=null}">
			<tr>
				<td>编号</td><td>${obj.id }<input type="hidden" name="o.id" value="${obj.id}"/></td>
			</tr>
			<tr>
				<td>标题</td><td><input name="o.title" value="${obj.title }"/></td>
			</tr>
			<tr>
				<td>图片预览</td><td><img style="width:600px;" src="${contextPath }${obj.image}"/>
				<input type="hidden" name="o.image" value="${obj.image }"/>
				</td>
			</tr>
			<tr>
				<td>图片</td><td><input type="file" name="image" /></td>
			</tr>
			<tr>
				<td>关联文章编号</td><td><input name="o.articleid" value="${obj.articleid}"></td>
			</tr>
		</c:if>
		<tr>
			<td><button type="submit">提交</button></td>
		</tr>		
	</tbody>
</table>
</form>
